Walmart has agreed to pay $20 million to settle a companywide hiring lawsuit filed against the retail giant by the Equal Employment Opportunity Commission alleging sex discrimination.

At issue was Walmart requiring applicants to successfully complete a physical agility test when applying to be an “order filler” at its grocery distribution centers nationwide. The test disproportionately excluded female applicants, resulting in disparate impact on women.

When a pre-employment test results in a disparate impact, the employer must show that the test is necessary for the safe and efficient performance of the specific job, and that there are not alternative practices that can achieve the employer’s objectives but have a less discriminatory effect.